﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InsideDL.MISControl;

namespace InsideDL.MISService
{
    public class VerifyMatrix:InsideDL.MISInterface.iVerify
    {
        protected string[] downList = null;

        public List<UserControlMatrix> UserControls = null;
        public UserControlMatrix ErrorControl = null;

        #region iVerify Members

        public virtual bool Verify()
        {
            bool ok = false;
            foreach (UserControlMatrix uc in UserControls)
            {
                this.ErrorControl = null;
                ok = uc.Verify();
                if (ok)
                {
                    this.ErrorControl = uc;
                    break;
                }
            }
            return ok;            
        }

        public virtual bool CheckFileInFtp(object[] p_paras)
        {
            throw new NotImplementedException();
        }

        public virtual string[] GetDownList()
        {
            return downList == null ? new string[] { string.Empty } : downList;
        }

        #endregion
    }
}
